package com.xiaozhengkeji.mc.xzlib.test.httptest;

import com.sun.net.httpserver.HttpHandler;
import com.xiaozhengkeji.mc.xzlib.module.HttpModule;

import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedHashMap;

public class HttpTestModule {
    private HashMap<String, HttpHandler> HttpHash = new LinkedHashMap<>();
    private HttpModule httpModule = null;

    public HttpTestModule() {
        HttpHash.put("/text", new HttpHandlerTest());
        HttpHash.put("/text2", new HttpHandlerTest());
        try {
            //创建Http服务器  端口8080 service处理器工程HttpHash 线程数量10
            this.httpModule = new HttpModule(8080, HttpHash, 10);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
